package com.hrm.service.njh;

import com.hrm.dao.njh.DocumentMapper;
import com.hrm.entity.Document;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;


@Service
public class DocumentServiceImpl implements DocumentService {
    @Autowired
    DocumentMapper documentMapper;

    @Override
    public int addDocument(Document document) {
        int i = documentMapper.addDocument(document);
        return i;
    }

    @Override
    public List<Document> selectDocumentList(String filename) {
        List<Document> documents = documentMapper.selectDocumentList(filename);
        return documents;
    }

    @Override
    public int deletedocument(Integer id) {
        int deletedocument = documentMapper.deletedocument(id);
        return deletedocument;
    }
}
